package com.wpf.system.mapper;

import com.wpf.system.entity.EquipmentRent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wpf.system.entity.vo.EquipmentChartVO;
import com.wpf.system.entity.vo.EquipmentRentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author ferna
* @description 针对表【equipment_rent(器材租赁表)】的数据库操作Mapper
* @createDate 2023-02-13 23:38:00
* @Entity com.wpf.system.entity.EquipmentRent
*/
public interface EquipmentRentMapper extends BaseMapper<EquipmentRent> {

    /**
     * 物理删除租赁记录
     * @param id 租赁记录主键
     * @return 是否删除成功
     */
    int deleteEQRentById(@Param("id") Long id);

    /**
     * 根据条件查看租赁情况
     */
    List<EquipmentRentVO> getAllEquipmentRent(
            @Param("no") String no,@Param("uid") Long uid,@Param("name") String name,@Param("nid") String nid,
            @Param("username") String username,@Param("phone") String phone,
            @Param("startTime") String startTime,@Param("endTime") String endTime,
            @Param("page") Integer page,@Param("pageSize") Integer pageSize
    );

    /**
     * 获取租借图表情况
     */
    List<EquipmentChartVO> getEquipmentRentChartData(@Param("startDate") String startDate,@Param("endDate") String endDate);
}




